package ooday01.homework;

public class Student {
    //第一遍：
    /*

    //成员变量：
    String name;
    int age;
    String className;
    String id;

    //无参：
    Student(){
    }
    //有参：
    Student(String name,int age,String className,String id){
        this.name = name;
        this.age=age;
        this.className =className;
        this.id= id;
    }
    void study(){
        System.out.println(name+"正在学习........");
    }
    void sayHi(){
        System.out.println("大家好，我叫"+name+"，今年"+age+"岁了，班级是："+className+",学号是："+id);

    }
    void playWith(String anotherName){
        System.out.println(name+"在和"+anotherName+"一起玩耍..");
    }

     */

    //第二遍：

    //成员变量：
    String name;
    int age;
    String className;
    String id;

    //无参：
    Student(){
    }
    //有参：
    Student(String name,int age,String className,String id){
        this.name = name;
        this.age=age;
        this.className =className;
        this.id= id;
    }
    void study(){
        System.out.println(name+"正在学习........");
    }
    void sayHi(){
        System.out.println("大家好，我叫"+name+"，今年"+age+"岁了，班级是："+className+",学号是："+id);

    }
    void playWith(String anotherName){
        System.out.println(name+"在和"+anotherName+"一起玩耍..");
    }


}
